//
//  CXTabBarController.h
//  Lottery
//
//  Created by 黄修勇 on 12-4-22.
//  Copyright (c) 2012年 __MyCompanyName__. All rights reserved.
//

#import <UIKit/UIKit.h>

#define MaxTabImageViewNumber 5//if project is iphone is 5 

@class CXTabBarBackGroundView;
@class CXTabBarItemView;

typedef enum{
    
    CXTabBarControllerSelectModelSingle=0,//这个模式为背景有一个选中的view随着选中不同的viewcontroller而移动
    CXTabBarControllerSelectModelNumbers=1,//这个模式为选中与没选中有两种状态变化 时间来不及此功能还未完善
    
}CXTabBarControllerSelectModel;

@interface CXTabBarController : UITabBarController{
    
@private
    CXTabBarBackGroundView *tabBarView;//最底层的view 添加在UITabBar上面为 所有视图的父视图
}

@property (nonatomic)CXTabBarControllerSelectModel itemSelectModel;//选择的模式 暂时只支持 CXTabBarControllerSelectModelSingle 
@property (nonatomic,retain)UIView *tabBarBackgroundView;//背景视图

@property (nonatomic,retain)NSArray *tabItemNormalImages;//普通状态的image 数组

-(void)setTabItemNormalImages:(NSArray *)tabItemNormalImages animated:(BOOL)animated;

@property (nonatomic,retain)NSArray *tabItemSelectImages;//选中状态的image 数组 在CXTabBarControllerSelectModelNumbers有用

@property (nonatomic)BOOL tabItemSelectAnimated;//更换viewcontroller是否动画播放 默认为 YES

@property (nonatomic,retain)UIView *selectItemBackgroundView;//选中状态的视图
@end


@interface CXTabBarBackGroundView : UIView

@property (nonatomic,retain,readonly)NSMutableArray *imageViewArray;//所有的item视图数组
@property (nonatomic,retain)UIView *selectItemView;//选中的shitu 

@property (nonatomic)NSInteger selectIndex;

-(void)setSelectIndex:(NSInteger)selectIndex animated:(BOOL)animated;
@end

@interface CXTabBarItemView : UIView

@property (nonatomic,retain,readonly)UIImageView *backgroundImageView;
@property (nonatomic,retain,readonly)UIImageView *imageView;
@property (nonatomic,retain,readonly)UILabel *titleLabel;
@end